package handler

import (
	"fmt"
	"time"
	"travel/project/global"
	"travel/project/intdler/models"
	"travel/project/mysql"
)

func Show() {
	var user []models.User

	var nuser []*models.User

	for _, m := range user {
		global.MysqlDB.Where("id = ?", m.Id).First(&user)
		users := models.User{
			Id:       m.Id,
			Mobile:   m.Mobile,
			Username: m.Username,
			Password: m.Password,
		}
		global.RDB.Set(mysql.Ctx, m.Username, nuser, time.Minute*2)
		nuser = append(nuser, &users)
	}
	fmt.Println(nuser)
}
